<script setup>
import {
  Management,
  Promotion,
  UserFilled,
  User,
  Crop,
  EditPen,
  SwitchButton,
  CaretBottom,
} from "@element-plus/icons-vue";
import avatar from "@/assets/default.png";
</script>

<template>
  <!-- el-container是element-plus中的容器 -->
  <el-container class="layout-container">
    <!-- 左侧菜单 -->
    <el-aside width="200px">
      <div class="el-aside__logo">
          <div class="loader"></div>
      </div>
      <!-- 左侧element-plus的菜单标签 -->

      <el-menu
        active-text-color="#ffd04b"
        background-color="#409ffb"
        text-color="#fff"
        router
      >
        <el-menu-item index="/video/videoManage">
          <el-icon>
            <Management />
          </el-icon>
          <span>大模型视频分析</span>
        </el-menu-item>
        <el-menu-item index="/unity">
          <el-icon>
            <Management />
          </el-icon>
          <span>数字孪生</span>
        </el-menu-item>
        <!-- <el-menu-item index="/warehouse/goodsManage"> -->
          <!-- <el-icon> -->
            <!-- <Promotion /> -->
          <!-- </el-icon> -->
          <!-- <span>货物操作</span> -->
        <!-- </el-menu-item> -->
        <!-- 左侧element-plus子菜单 -->
        <el-sub-menu>
          <template #title>
            <el-icon>
              <UserFilled />
            </el-icon>
            <span>个人中心</span>
          </template>
          <el-menu-item index="/user/userInfo">
            <el-icon>
              <User />
            </el-icon>
            <span>基本资料</span>
          </el-menu-item>
          <!-- <el-menu-item index="/user/userResetPassword"> -->
            <!-- <el-icon> -->
              <!-- <EditPen /> -->
            <!-- </el-icon> -->
            <!-- <span>重置密码</span> -->
          <!-- </el-menu-item> -->
        </el-sub-menu>
      </el-menu>
    </el-aside>
    <!-- 右侧主区域 -->
    <el-container>
      <!-- 右侧头部区域 -->
      <el-header>
        <!-- <div>我是<strong>zjs</strong></div> -->
        <!-- 头像下拉菜单 -->
        <!-- <el-dropdown placement="bottom-end"> -->
        <!-- <span class="el-dropdown__box"> -->
        <!-- el-avatar是头像 -->
        <!-- <el-avatar :src="avatar" /> -->
        <!-- <el-icon> -->
        <!-- <CaretBottom /> -->
        <!-- </el-icon> -->
        <!-- </span> -->
        <!-- <template #dropdown> -->
        <!-- <el-dropdown-menu> -->
        <!-- <el-dropdown-item command="profile" :icon="User">基本资料</el-dropdown-item> -->
        <!-- <el-dropdown-item command="avatar" :icon="Crop">更换头像</el-dropdown-item> -->
        <!-- <el-dropdown-item command="password" :icon="EditPen">重置密码</el-dropdown-item> -->
        <!-- <el-dropdown-item command="logout" :icon="SwitchButton">退出登录</el-dropdown-item> -->
        <!-- </el-dropdown-menu> -->
        <!-- </template> -->
        <!-- </el-dropdown> -->
        <div>霍明宣组智行监控系统</div>
      </el-header>
      <!-- 右侧中间区域 -->
      <el-main>
        <!-- <div style="width: 1290px; height: 570px;border: 1px solid red;"> -->
        <!-- 内容展示区 -->
        <!-- </div> -->
        <router-view></router-view>
      </el-main>
      <!-- 右侧底部区域 -->
      <el-footer>霍明宣组智行监控系统 ©2024 Created by group8</el-footer>
    </el-container>
  </el-container>
</template>

<style lang="scss" scoped>
.loader {
  height: 60px;
  aspect-ratio: 1;
  position: relative;
  margin-left: 65px;
  margin-top: 35px;
}
.loader::before,
.loader::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform-origin: bottom;
}
.loader::after {
  background:
          radial-gradient(at 75% 15%,#fffb,#0000 35%),
          radial-gradient(at 80% 40%,#0000,#0008),
          radial-gradient(circle  5px,#fff 94%,#0000),
          radial-gradient(circle 10px,#000 94%,#0000),
          linear-gradient(#F93318 0 0) top   /100% calc(50% - 5px),
          linear-gradient(#fff    0 0) bottom/100% calc(50% - 5px)
          #000;
  background-repeat: no-repeat;
  animation: l20 1s infinite cubic-bezier(0.5,120,0.5,-120);
}
.loader::before {
  background:#ddd;
  filter: blur(8px);
  transform: scaleY(0.4) translate(-13px, 0px);
}
@keyframes l20 {
  30%,70% {transform:rotate(0deg)}
  49.99%  {transform:rotate(0.2deg)}
  50%     {transform:rotate(-0.2deg)}
}
.layout-container {
  height: 100vh;

  .el-aside {
    background-color: #409ffb;

    &__logo {
      height: 120px;
      background: url("@/assets/logo.png") no-repeat center / 120px auto;
    }

    .el-menu {
      border-right: none;
    }
  }

  .el-header {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;

    .el-dropdown__box {
      display: flex;
      align-items: center;

      .el-icon {
        color: #999;
        margin-left: 10px;
      }

      &:active,
      &:focus {
        outline: none;
      }
    }
  }

  .el-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
  }
}
</style>